

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>mindspore.ops.op_info_register &mdash; MindSpore master documentation</title>
  

  
  <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/underscore.js"></script>
        <script src="../../../_static/doctools.js"></script>
        <script src="../../../_static/language_data.js"></script>
        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../../../index.html" class="icon icon-home"> MindSpore
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">MindSpore Python API</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.html">mindspore</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.common.initializer.html">mindspore.common.initializer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.communication.html">mindspore.communication</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.compression.html">mindspore.compression</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.context.html">mindspore.context</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.dataset.html">mindspore.dataset</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.dataset.audio.html">mindspore.dataset.audio</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.dataset.config.html">mindspore.dataset.config</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.dataset.text.html">mindspore.dataset.text</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.dataset.transforms.html">mindspore.dataset.transforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.dataset.vision.html">mindspore.dataset.vision</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.mindrecord.html">mindspore.mindrecord</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.nn.html">mindspore.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.nn.probability.html">mindspore.nn.probability</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.nn.transformer.html">mindspore.nn.transformer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.numpy.html">mindspore.numpy</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.ops.html">mindspore.ops</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.parallel.html">mindspore.parallel</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.parallel.nn.html">mindspore.parallel.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.profiler.html">mindspore.profiler</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.scipy.html">mindspore.scipy</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.train.html">mindspore.train</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api_python/mindspore.boost.html">mindspore.boost</a></li>
</ul>
<p class="caption"><span class="caption-text">MindSpore C++ API</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://www.mindspore.cn/lite/api/zh-CN/master/api_cpp/mindspore.html">MindSpore Lite↗</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../index.html">MindSpore</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../../index.html" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../../index.html">Module code</a> &raquo;</li>
        
      <li>mindspore.ops.op_info_register</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <h1>Source code for mindspore.ops.op_info_register</h1><div class="highlight"><pre>
<span></span><span class="c1"># Copyright 2020 Huawei Technologies Co., Ltd</span>
<span class="c1">#</span>
<span class="c1"># Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span>
<span class="c1"># you may not use this file except in compliance with the License.</span>
<span class="c1"># You may obtain a copy of the License at</span>
<span class="c1">#</span>
<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing, software</span>
<span class="c1"># distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span>
<span class="c1"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<span class="c1"># See the License for the specific language governing permissions and</span>
<span class="c1"># limitations under the License.</span>
<span class="c1"># ============================================================================</span>

<span class="sd">&quot;&quot;&quot;Operators info register.&quot;&quot;&quot;</span>

<span class="kn">import</span> <span class="nn">inspect</span>
<span class="kn">import</span> <span class="nn">json</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">functools</span>

<span class="kn">from</span> <span class="nn">mindspore._c_expression</span> <span class="kn">import</span> <span class="n">Oplib</span>

<span class="kn">from</span> <span class="nn">mindspore._checkparam</span> <span class="kn">import</span> <span class="n">Validator</span> <span class="k">as</span> <span class="n">validator</span>

<span class="c1"># path of built-in op info register.</span>
<span class="n">BUILT_IN_OPS_REGISTER_PATH</span> <span class="o">=</span> <span class="s2">&quot;mindspore/ops/_op_impl&quot;</span>
<span class="n">BUILT_IN_CUSTOM_OPS_REGISTER_PATH</span> <span class="o">=</span> <span class="s2">&quot;mindspore/ops/_op_impl/_custom_op&quot;</span>


<div class="viewcode-block" id="op_info_register"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.op_info_register.html#mindspore.ops.op_info_register">[docs]</a><span class="k">def</span> <span class="nf">op_info_register</span><span class="p">(</span><span class="n">op_info</span><span class="p">):</span>
    <span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    A decorator which is used to register an operator.</span>

<span class="sd">    Note:</span>
<span class="sd">        &#39;op_info&#39; should represent the operator information by string with json format.</span>
<span class="sd">        The &#39;op_info&#39; will be added into oplib.</span>

<span class="sd">    Args:</span>
<span class="sd">        op_info (str or dict): operator information in json format.</span>

<span class="sd">    Examples:</span>
<span class="sd">        &gt;&gt;&gt; from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType</span>
<span class="sd">        &gt;&gt;&gt; abs_op_info = TBERegOp(&quot;Abs&quot;) \</span>
<span class="sd">        ...    .fusion_type(&quot;ELEMWISE&quot;) \</span>
<span class="sd">        ...    .async_flag(False) \</span>
<span class="sd">        ...    .binfile_name(&quot;abs.so&quot;) \</span>
<span class="sd">        ...    .compute_cost(10) \</span>
<span class="sd">        ...    .kernel_name(&quot;abs&quot;) \</span>
<span class="sd">        ...    .partial_flag(True) \</span>
<span class="sd">        ...    .op_pattern(&quot;formatAgnostic&quot;) \</span>
<span class="sd">        ...    .input(0, &quot;x&quot;, None, &quot;required&quot;, None) \</span>
<span class="sd">        ...    .output(0, &quot;y&quot;, True, &quot;required&quot;, &quot;all&quot;) \</span>
<span class="sd">        ...    .dtype_format(DataType.F16_None, DataType.F16_None) \</span>
<span class="sd">        ...    .dtype_format(DataType.F32_None, DataType.F32_None) \</span>
<span class="sd">        ...    .dtype_format(DataType.I32_None, DataType.I32_None) \</span>
<span class="sd">        ...    .get_op_info()</span>
<span class="sd">        &gt;&gt;&gt;</span>
<span class="sd">        &gt;&gt;&gt; @op_info_register(abs_op_info)</span>
<span class="sd">        ... def _abs_tbe():</span>
<span class="sd">        ...    return</span>
<span class="sd">        ...</span>

<span class="sd">    Returns:</span>
<span class="sd">        Function, returns a decorator for op info register.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="nf">register_decorator</span><span class="p">(</span><span class="n">func</span><span class="p">):</span>
        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">op_info</span><span class="p">,</span> <span class="nb">dict</span><span class="p">):</span>
            <span class="n">op_info_real</span> <span class="o">=</span> <span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">op_info</span><span class="p">)</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="n">op_info_real</span> <span class="o">=</span> <span class="n">op_info</span>
        <span class="n">validator</span><span class="o">.</span><span class="n">check_value_type</span><span class="p">(</span><span class="s2">&quot;op_info&quot;</span><span class="p">,</span> <span class="n">op_info_real</span><span class="p">,</span> <span class="p">[</span><span class="nb">str</span><span class="p">])</span>
        <span class="n">op_lib</span> <span class="o">=</span> <span class="n">Oplib</span><span class="p">()</span>
        <span class="n">file_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">inspect</span><span class="o">.</span><span class="n">getfile</span><span class="p">(</span><span class="n">func</span><span class="p">))</span>
        <span class="c1"># keep the path custom ops implementation.</span>
        <span class="k">if</span> <span class="n">BUILT_IN_CUSTOM_OPS_REGISTER_PATH</span> <span class="ow">in</span> <span class="n">file_path</span><span class="p">:</span>
            <span class="n">imply_path</span> <span class="o">=</span> <span class="n">file_path</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="n">imply_path</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span> <span class="k">if</span> <span class="n">BUILT_IN_OPS_REGISTER_PATH</span> <span class="ow">in</span> <span class="n">file_path</span> <span class="k">else</span> <span class="n">file_path</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">op_lib</span><span class="o">.</span><span class="n">reg_op</span><span class="p">(</span><span class="n">op_info_real</span><span class="p">,</span> <span class="n">imply_path</span><span class="p">):</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;Invalid op info </span><span class="si">{}</span><span class="s1">:</span><span class="se">\n</span><span class="si">{}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">file_path</span><span class="p">,</span> <span class="n">op_info_real</span><span class="p">))</span>

        <span class="k">def</span> <span class="nf">wrapped_function</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
            <span class="k">return</span> <span class="n">func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>

        <span class="k">return</span> <span class="n">wrapped_function</span>

    <span class="k">return</span> <span class="n">register_decorator</span></div>


<div class="viewcode-block" id="custom_info_register"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.custom_info_register.html#mindspore.ops.custom_info_register">[docs]</a><span class="k">def</span> <span class="nf">custom_info_register</span><span class="p">(</span><span class="o">*</span><span class="n">reg_info</span><span class="p">):</span>
    <span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    A decorator which is used to bind the registration information to the `func` parameter of</span>
<span class="sd">    :class:`mindspore.ops.Custom`.</span>

<span class="sd">    Note:</span>
<span class="sd">        The &#39;reg_info&#39; will be added into oplib.</span>

<span class="sd">    Args:</span>
<span class="sd">        reg_info (tuple[str, dict]): Each item represents registration information in json format.</span>

<span class="sd">    Returns:</span>
<span class="sd">        Function, returns a decorator for op info register.</span>

<span class="sd">    Examples:</span>
<span class="sd">        &gt;&gt;&gt; from mindspore.ops import custom_info_register, CustomRegOp, DataType</span>
<span class="sd">        &gt;&gt;&gt; custom_func_ascend_info = CustomRegOp() \</span>
<span class="sd">        ...     .input(0, &quot;x&quot;, &quot;dynamic&quot;) \</span>
<span class="sd">        ...     .output(0, &quot;y&quot;) \</span>
<span class="sd">        ...     .dtype_format(DataType.F16_Default, DataType.F16_Default) \</span>
<span class="sd">        ...     .dtype_format(DataType.F32_Default, DataType.F32_Default) \</span>
<span class="sd">        ...     .target(&quot;Ascend&quot;) \</span>
<span class="sd">        ...     .get_op_info()</span>
<span class="sd">        &gt;&gt;&gt;</span>
<span class="sd">        &gt;&gt;&gt; @custom_info_register(custom_func_ascend_info)</span>
<span class="sd">        ... def custom_func(x):</span>
<span class="sd">        ...     pass</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="nf">decorator</span><span class="p">(</span><span class="n">func</span><span class="p">):</span>
        <span class="nb">setattr</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="s2">&quot;reg_info&quot;</span><span class="p">,</span> <span class="n">reg_info</span><span class="p">)</span>

        <span class="nd">@functools</span><span class="o">.</span><span class="n">wraps</span><span class="p">(</span><span class="n">func</span><span class="p">)</span>
        <span class="k">def</span> <span class="nf">wrapper</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
            <span class="k">return</span> <span class="n">func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>

        <span class="k">return</span> <span class="n">wrapper</span>

    <span class="k">return</span> <span class="n">decorator</span></div>


<span class="k">class</span> <span class="nc">RegOp</span><span class="p">:</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Base class for op info register.</span>

<span class="sd">    Args:</span>
<span class="sd">        op_name (str): Name of op.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op_name</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">):</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">op_name</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;op name value must be string&quot;</span><span class="p">)</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">op_name</span><span class="o">.</span><span class="n">strip</span><span class="p">():</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;op name is empty&quot;</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">op_name</span> <span class="o">=</span> <span class="n">op_name</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">inputs</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">outputs</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">attr_</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fusion_type_</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">dtype_format_</span> <span class="o">=</span> <span class="p">[]</span>

    <span class="k">def</span> <span class="nf">_is_string</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Check if the value is a str type.</span>

<span class="sd">        Args:</span>
<span class="sd">            value: Parameter to be checked.</span>

<span class="sd">        Raises:</span>
<span class="sd">            TypeError: If the type of value is not a str.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span>
            <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> value must be str&quot;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">value</span><span class="p">))</span>
        <span class="k">return</span> <span class="kc">True</span>

    <span class="k">def</span> <span class="nf">_is_int</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Check if the value is an int.</span>

<span class="sd">        Args:</span>
<span class="sd">            value: Parameter to be checked.</span>

<span class="sd">        Raises:</span>
<span class="sd">            TypeError: If the type of value is not an int.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="nb">int</span><span class="p">):</span>
            <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> value must be int&quot;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">value</span><span class="p">))</span>
        <span class="k">return</span> <span class="kc">True</span>

    <span class="k">def</span> <span class="nf">_is_bool</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Check if the value is a bool.</span>

<span class="sd">        Args:</span>
<span class="sd">            value: Parameter to be checked.</span>

<span class="sd">        Raises:</span>
<span class="sd">            TypeError: If the type of value is not a bool.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="nb">bool</span><span class="p">):</span>
            <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> value must be bool&quot;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">value</span><span class="p">))</span>
        <span class="k">return</span> <span class="kc">True</span>

    <span class="k">def</span> <span class="nf">_check_param</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Check if the parameter type is correct.</span>

<span class="sd">        Args:</span>
<span class="sd">            param_list (list): Parameter list to be checked.</span>
<span class="sd">            key_list (list): The keys of output dict.</span>
<span class="sd">            fn_list (list): Function used for parameter checking. If the function list has only one element,</span>
<span class="sd">                            all parameters will use the same function.</span>
<span class="sd">            kwargs (dict): Other parameter information.</span>

<span class="sd">        Raises:</span>
<span class="sd">            TypeError: If the type of value is not list.</span>
<span class="sd">            ValueError: If the size of param list is not equal to the size of key list, or</span>
<span class="sd">                        the size of param list is not equal to the size of function list.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="p">[</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">]:</span>
            <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
                <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> value must be list type&quot;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">i</span><span class="p">))</span>
        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">param_list</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">key_list</span><span class="p">)</span> <span class="ow">or</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">fn_list</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">1</span> <span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">param_list</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">fn_list</span><span class="p">)):</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;param_list size </span><span class="si">{}</span><span class="s2">, key_list size </span><span class="si">{}</span><span class="s2">, must be equal.And fn_list size </span><span class="si">{}</span><span class="s2">.&quot;</span><span class="o">.</span>
                             <span class="nb">format</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">param_list</span><span class="p">),</span> <span class="nb">len</span><span class="p">(</span><span class="n">key_list</span><span class="p">),</span> <span class="nb">len</span><span class="p">(</span><span class="n">fn_list</span><span class="p">)))</span>
        <span class="n">out_dict</span> <span class="o">=</span> <span class="p">{}</span>
        <span class="k">for</span> <span class="n">idx</span><span class="p">,</span> <span class="n">element</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">param_list</span><span class="p">):</span>
            <span class="k">if</span> <span class="n">element</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
                <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">fn_list</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
                    <span class="n">fn_list</span><span class="p">[</span><span class="mi">0</span><span class="p">](</span><span class="n">element</span><span class="p">)</span>
                <span class="k">else</span><span class="p">:</span>
                    <span class="n">fn_list</span><span class="p">[</span><span class="n">idx</span><span class="p">](</span><span class="n">element</span><span class="p">)</span>
                <span class="n">out_dict</span><span class="p">[</span><span class="n">key_list</span><span class="p">[</span><span class="n">idx</span><span class="p">]]</span> <span class="o">=</span> <span class="n">element</span>
        <span class="k">if</span> <span class="n">kwargs</span><span class="p">:</span>
            <span class="n">out_dict</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">out_dict</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">out_dict</span>

    <span class="k">def</span> <span class="nf">fusion_type</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">fusion_type</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Fusion type of the operator.</span>

<span class="sd">        Args:</span>
<span class="sd">            fusion_type (str): Value of fusion type.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">(</span><span class="n">fusion_type</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fusion_type_</span> <span class="o">=</span> <span class="n">fusion_type</span>
        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">dtype_format</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        A dtype and format supported by the operator.</span>

<span class="sd">        Args:</span>
<span class="sd">            args (tuple): Value of dtype and format.</span>

<span class="sd">        Raises:</span>
<span class="sd">            ValueError: If the size of args not equal to input size add output size.</span>
<span class="sd">            TypeError: If the type of args is not tuple.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">inputs</span><span class="p">)</span> <span class="o">+</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">outputs</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">):</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;input size add output size must be equal to dtype format size&quot;</span><span class="p">)</span>
        <span class="n">dtype_format</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="k">for</span> <span class="n">arg</span> <span class="ow">in</span> <span class="n">args</span><span class="p">:</span>
            <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">arg</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">)</span> <span class="ow">or</span> <span class="nb">len</span><span class="p">(</span><span class="n">arg</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">2</span><span class="p">:</span>
                <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;dtype and format value must be tuple of two elements&quot;</span><span class="p">)</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">(</span><span class="n">arg</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">(</span><span class="n">arg</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
            <span class="n">dtype_format</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">arg</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">dtype_format_</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">tuple</span><span class="p">(</span><span class="n">dtype_format</span><span class="p">))</span>
        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">get_op_info</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Return all registration information for this instance.</span>

<span class="sd">        The &#39;_&#39; character ending the key is removed here for compatibility with previous version.</span>

<span class="sd">        Key will be unified into an underlined form later.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">op_info</span> <span class="o">=</span> <span class="p">{}</span>
        <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
            <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="nb">str</span><span class="p">)</span> <span class="ow">and</span> <span class="n">key</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s1">&#39;_&#39;</span><span class="p">):</span>
                <span class="n">op_info</span><span class="p">[</span><span class="n">key</span><span class="o">.</span><span class="n">rstrip</span><span class="p">(</span><span class="s1">&#39;_&#39;</span><span class="p">)]</span> <span class="o">=</span> <span class="n">value</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="n">op_info</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
        <span class="k">return</span> <span class="n">op_info</span>


<span class="k">class</span> <span class="nc">CpuRegOp</span><span class="p">(</span><span class="n">RegOp</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Class for Cpu op info register&quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op_name</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">(</span><span class="n">CpuRegOp</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">op_name</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">imply_type</span> <span class="o">=</span> <span class="s2">&quot;CPU&quot;</span>

    <span class="k">def</span> <span class="nf">input</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">param_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register Cpu op input information.</span>

<span class="sd">        Args:</span>
<span class="sd">            index (int): Order of the input. Default: None.</span>
<span class="sd">            name (str): Name of the input. Default: None.</span>
<span class="sd">            param_type (str): Param type of the input. Default: None.</span>
<span class="sd">            kwargs (dict): Other information of the input.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">index</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">param_type</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;index&quot;</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;param_type&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_int</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">input_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">inputs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">input_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">output</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">param_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register AiCPU op output information.</span>

<span class="sd">        Args:</span>
<span class="sd">            index (int): Order of the output. Default: None.</span>
<span class="sd">            name (str): Name of the output. Default: None.</span>
<span class="sd">            param_type (str): Param type of the output. Default: None.</span>
<span class="sd">            kwargs (dict): Other information of the output.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">index</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">param_type</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;index&quot;</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;param_type&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_int</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">output_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">outputs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">output_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">attr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">value_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register AiCPU op attribute information.</span>

<span class="sd">        Args:</span>
<span class="sd">            name (str): Name of the attribute. Default: None.</span>
<span class="sd">            value_type (str): Value type of the attribute. Default: None.</span>
<span class="sd">            value (str): Value of the attribute. Default: None.</span>
<span class="sd">            kwargs (dict): Other information of the attribute.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">name</span><span class="p">,</span> <span class="n">value_type</span><span class="p">,</span> <span class="n">value</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;type&quot;</span><span class="p">,</span> <span class="s2">&quot;value&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">attr_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">attr_</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">attr_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span>


<span class="k">class</span> <span class="nc">AkgRegOp</span><span class="p">(</span><span class="n">RegOp</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Class for Akg op info register.&quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op_name</span><span class="p">,</span> <span class="n">processor</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">(</span><span class="n">AkgRegOp</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">op_name</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">imply_type</span> <span class="o">=</span> <span class="s2">&quot;AKG&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">processor</span> <span class="o">=</span> <span class="n">processor</span>

    <span class="k">def</span> <span class="nf">input</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">param_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register Akg op input information.</span>

<span class="sd">        Args:</span>
<span class="sd">            index (int): Order of the input. Default: None.</span>
<span class="sd">            name (str): Name of the input. Default: None.</span>
<span class="sd">            param_type (str): Param type of the input. Default: None.</span>
<span class="sd">            kwargs (dict): Other information of the input.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">index</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">param_type</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;index&quot;</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;param_type&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_int</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">input_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">inputs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">input_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">output</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register Akg op output information.</span>

<span class="sd">        Args:</span>
<span class="sd">            index (int): Order of the output. Default: None.</span>
<span class="sd">            name (str): Name of the output. Default: None.</span>
<span class="sd">            kwargs (dict): Other information of the output.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">index</span><span class="p">,</span> <span class="n">name</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;index&quot;</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_int</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">output_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">outputs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">output_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">attr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">param_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">value_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register Akg op attribute information.</span>

<span class="sd">        Args:</span>
<span class="sd">            name (str): Name of the attribute. Default: None.</span>
<span class="sd">            param_type (str): Param type of the attribute. Default: None.</span>
<span class="sd">            value_type (str): Value type of the attribute. Default: None.</span>
<span class="sd">            kwargs (dict): Other information of the attribute.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">name</span><span class="p">,</span> <span class="n">param_type</span><span class="p">,</span> <span class="n">value_type</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;param_type&quot;</span><span class="p">,</span> <span class="s2">&quot;type&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">attr_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">attr_</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">attr_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span>


<span class="k">class</span> <span class="nc">AkgGpuRegOp</span><span class="p">(</span><span class="n">AkgRegOp</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Class for AkgGpu op info register&quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op_name</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">(</span><span class="n">AkgGpuRegOp</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">op_name</span><span class="p">,</span> <span class="s2">&quot;CUDA&quot;</span><span class="p">)</span>


<span class="k">class</span> <span class="nc">AkgAscendRegOp</span><span class="p">(</span><span class="n">AkgRegOp</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Class for AkgAscend op info register&quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op_name</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">(</span><span class="n">AkgAscendRegOp</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">op_name</span><span class="p">,</span> <span class="s2">&quot;AiCore&quot;</span><span class="p">)</span>


<div class="viewcode-block" id="AiCPURegOp"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.AiCPURegOp.html#mindspore.ops.AiCPURegOp">[docs]</a><span class="k">class</span> <span class="nc">AiCPURegOp</span><span class="p">(</span><span class="n">CpuRegOp</span><span class="p">):</span>
    <span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Class for AiCPU operator information register.</span>

<span class="sd">    Args:</span>
<span class="sd">        op_name (str):kernel name.</span>

<span class="sd">    Examples:</span>
<span class="sd">        &gt;&gt;&gt; from mindspore.ops.op_info_register import op_info_register, AiCPURegOp, DataType</span>
<span class="sd">        &gt;&gt;&gt; stack_op_info = AiCPURegOp(&quot;Stack&quot;) \</span>
<span class="sd">        ...    .fusion_type(&quot;OPAQUE&quot;) \</span>
<span class="sd">        ...    .attr(&quot;axis&quot;, &quot;int&quot;) \</span>
<span class="sd">        ...    .input(0, &quot;x&quot;, &quot;dynamic&quot;) \</span>
<span class="sd">        ...    .output(0, &quot;y&quot;, &quot;required&quot;) \</span>
<span class="sd">        ...    .dtype_format(DataType.I8_Default, DataType.I8_Default) \</span>
<span class="sd">        ...    .dtype_format(DataType.I16_Default, DataType.I16_Default) \</span>
<span class="sd">        ...    .dtype_format(DataType.I32_Default, DataType.I32_Default) \</span>
<span class="sd">        ...    .dtype_format(DataType.I64_Default, DataType.I64_Default) \</span>
<span class="sd">        ...    .dtype_format(DataType.U8_Default, DataType.U8_Default) \</span>
<span class="sd">        ...    .dtype_format(DataType.U16_Default, DataType.U16_Default) \</span>
<span class="sd">        ...    .dtype_format(DataType.U32_Default, DataType.U32_Default) \</span>
<span class="sd">        ...    .dtype_format(DataType.U64_Default, DataType.U64_Default) \</span>
<span class="sd">        ...    .dtype_format(DataType.F16_Default, DataType.F16_Default) \</span>
<span class="sd">        ...    .dtype_format(DataType.F32_Default, DataType.F32_Default) \</span>
<span class="sd">        ...    .dtype_format(DataType.F64_Default, DataType.F64_Default) \</span>
<span class="sd">        ...    .dtype_format(DataType.BOOL_Default, DataType.BOOL_Default) \</span>
<span class="sd">        ...    .get_op_info()</span>
<span class="sd">        &gt;&gt;&gt;</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op_name</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">(</span><span class="n">AiCPURegOp</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">op_name</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">imply_type</span> <span class="o">=</span> <span class="s2">&quot;AiCPU&quot;</span></div>


<div class="viewcode-block" id="TBERegOp"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp">[docs]</a><span class="k">class</span> <span class="nc">TBERegOp</span><span class="p">(</span><span class="n">RegOp</span><span class="p">):</span>
    <span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Class for TBE operator information register.</span>

<span class="sd">    Args:</span>
<span class="sd">        op_name (str):kernel name.</span>

<span class="sd">    Examples:</span>
<span class="sd">        &gt;&gt;&gt; from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType</span>
<span class="sd">        &gt;&gt;&gt; abs_op_info = TBERegOp(&quot;Abs&quot;) \</span>
<span class="sd">        ...    .fusion_type(&quot;ELEMWISE&quot;) \</span>
<span class="sd">        ...    .async_flag(False) \</span>
<span class="sd">        ...    .binfile_name(&quot;abs.so&quot;) \</span>
<span class="sd">        ...    .compute_cost(10) \</span>
<span class="sd">        ...    .kernel_name(&quot;abs&quot;) \</span>
<span class="sd">        ...    .partial_flag(True) \</span>
<span class="sd">        ...    .op_pattern(&quot;formatAgnostic&quot;) \</span>
<span class="sd">        ...    .input(0, &quot;x&quot;, None, &quot;required&quot;, None) \</span>
<span class="sd">        ...    .output(0, &quot;y&quot;, True, &quot;required&quot;, &quot;all&quot;) \</span>
<span class="sd">        ...    .dtype_format(DataType.F16_None, DataType.F16_None) \</span>
<span class="sd">        ...    .dtype_format(DataType.F32_None, DataType.F32_None) \</span>
<span class="sd">        ...    .dtype_format(DataType.I32_None, DataType.I32_None) \</span>
<span class="sd">        ...    .get_op_info()</span>
<span class="sd">        &gt;&gt;&gt;</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op_name</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">(</span><span class="n">TBERegOp</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">op_name</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">imply_type</span> <span class="o">=</span> <span class="s2">&quot;TBE&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">async_flag_</span> <span class="o">=</span> <span class="kc">False</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">binfile_name_</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">compute_cost_</span> <span class="o">=</span> <span class="mi">10</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">kernel_name_</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">partial_flag_</span> <span class="o">=</span> <span class="kc">False</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">reshape_type_</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">dynamic_shape_</span> <span class="o">=</span> <span class="kc">False</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">dynamic_compile_static_</span> <span class="o">=</span> <span class="kc">False</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">need_check_supported_</span> <span class="o">=</span> <span class="kc">False</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">is_dynamic_format_</span> <span class="o">=</span> <span class="kc">False</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">op_pattern_</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>

<div class="viewcode-block" id="TBERegOp.async_flag"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.async_flag">[docs]</a>    <span class="k">def</span> <span class="nf">async_flag</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">async_flag</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Define the calculation efficiency of the operator, whether the asynchronous calculation is supported.</span>

<span class="sd">        Args:</span>
<span class="sd">            async_flag (bool): Value of async flag. Default: false.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_bool</span><span class="p">(</span><span class="n">async_flag</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">async_flag_</span> <span class="o">=</span> <span class="n">async_flag</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.binfile_name"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.binfile_name">[docs]</a>    <span class="k">def</span> <span class="nf">binfile_name</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">binfile_name</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Set the binary file name of the operator, it is optional.</span>

<span class="sd">        Args:</span>
<span class="sd">            binfile_name (str): The binary file name of the operator.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">(</span><span class="n">binfile_name</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">binfile_name_</span> <span class="o">=</span> <span class="n">binfile_name</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.compute_cost"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.compute_cost">[docs]</a>    <span class="k">def</span> <span class="nf">compute_cost</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">compute_cost</span><span class="o">=</span><span class="mi">10</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Define the calculation efficiency of operator, which refers to the value of the cost model</span>
<span class="sd">        in the tiling module.</span>

<span class="sd">        Args:</span>
<span class="sd">            compute_cost (int): Value of compute cost. Default: 10.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_int</span><span class="p">(</span><span class="n">compute_cost</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">compute_cost_</span> <span class="o">=</span> <span class="n">compute_cost</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.kernel_name"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.kernel_name">[docs]</a>    <span class="k">def</span> <span class="nf">kernel_name</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">kernel_name</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        The name of operator kernel.</span>

<span class="sd">        Args:</span>
<span class="sd">            kernel_name (str): Name of operator kernel.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">(</span><span class="n">kernel_name</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">kernel_name_</span> <span class="o">=</span> <span class="n">kernel_name</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.partial_flag"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.partial_flag">[docs]</a>    <span class="k">def</span> <span class="nf">partial_flag</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">partial_flag</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Define the calculation efficiency of operator, whether the partial calculation is supported.</span>

<span class="sd">        Args:</span>
<span class="sd">            partial_flag (bool): Value of partial flag. Default: true.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_bool</span><span class="p">(</span><span class="n">partial_flag</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">partial_flag_</span> <span class="o">=</span> <span class="n">partial_flag</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.reshape_type"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.reshape_type">[docs]</a>    <span class="k">def</span> <span class="nf">reshape_type</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">reshape_type</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Reshape type of operator.</span>

<span class="sd">        Args:</span>
<span class="sd">            reshape_type (str): Value of reshape type.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">(</span><span class="n">reshape_type</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">reshape_type_</span> <span class="o">=</span> <span class="n">reshape_type</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.dynamic_shape"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.dynamic_shape">[docs]</a>    <span class="k">def</span> <span class="nf">dynamic_shape</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dynamic_shape</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Whether the operator supports dynamic shape.</span>

<span class="sd">        Args:</span>
<span class="sd">            dynamic_shape (bool): Value of dynamic shape. Default: false.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_bool</span><span class="p">(</span><span class="n">dynamic_shape</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">dynamic_shape_</span> <span class="o">=</span> <span class="n">dynamic_shape</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.dynamic_compile_static"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.dynamic_compile_static">[docs]</a>    <span class="k">def</span> <span class="nf">dynamic_compile_static</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dynamic_compile_static</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Whether the operator supports dynamic compile static.</span>

<span class="sd">        Args:</span>
<span class="sd">            dynamic_compile_static (bool): Value of dynamic compile static. Default: false.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_bool</span><span class="p">(</span><span class="n">dynamic_compile_static</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">dynamic_compile_static_</span> <span class="o">=</span> <span class="n">dynamic_compile_static</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.need_check_supported"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.need_check_supported">[docs]</a>    <span class="k">def</span> <span class="nf">need_check_supported</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">need_check_supported</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Whether the operator needs check supports.</span>

<span class="sd">        Args:</span>
<span class="sd">            need_check_supported (bool): Value of need_check_supported. Default: false.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_bool</span><span class="p">(</span><span class="n">need_check_supported</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">need_check_supported_</span> <span class="o">=</span> <span class="n">need_check_supported</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.is_dynamic_format"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.is_dynamic_format">[docs]</a>    <span class="k">def</span> <span class="nf">is_dynamic_format</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">is_dynamic_format</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Whether the operator needs calop_select_format api.</span>

<span class="sd">        Args:</span>
<span class="sd">            is_dynamic_format (bool): Value of is_dynamic_format. Default: false.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_bool</span><span class="p">(</span><span class="n">is_dynamic_format</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">is_dynamic_format_</span> <span class="o">=</span> <span class="n">is_dynamic_format</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.op_pattern"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.op_pattern">[docs]</a>    <span class="k">def</span> <span class="nf">op_pattern</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">pattern</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        The behavior type of operator, such as broadcast, reduce and so on.</span>

<span class="sd">        Args:</span>
<span class="sd">            pattern (str): Value of op pattern. Default: None.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">if</span> <span class="n">pattern</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">(</span><span class="n">pattern</span><span class="p">):</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">op_pattern_</span> <span class="o">=</span> <span class="n">pattern</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.attr"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.attr">[docs]</a>    <span class="k">def</span> <span class="nf">attr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">param_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">value_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">default_value</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register TBE op attribute information.</span>

<span class="sd">        Args:</span>
<span class="sd">            name (str): Name of the attribute. Default: None.</span>
<span class="sd">            param_type (str): Param type of the attribute. Default: None.</span>
<span class="sd">            value_type (str): Type of the attribute. Default: None.</span>
<span class="sd">            value (str): Value of the attribute. Default: None.</span>
<span class="sd">            default_value (str): Default value of attribute. Default: None.</span>
<span class="sd">            kwargs (dict): Other information of the attribute.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">name</span><span class="p">,</span> <span class="n">param_type</span><span class="p">,</span> <span class="n">value_type</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="n">default_value</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;param_type&quot;</span><span class="p">,</span> <span class="s2">&quot;type&quot;</span><span class="p">,</span> <span class="s2">&quot;value&quot;</span><span class="p">,</span> <span class="s2">&quot;default_value&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">attr_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">attr_</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">attr_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.input"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.input">[docs]</a>    <span class="k">def</span> <span class="nf">input</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">need_compile</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">param_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">value_depend</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register TBE op input information.</span>

<span class="sd">        Args:</span>
<span class="sd">            index (int): Order of the input. Default: None.</span>
<span class="sd">            name (str): Name of the input. Default: None.</span>
<span class="sd">            need_compile (bool): Whether the input needs to be compiled or not. Default: None.</span>
<span class="sd">            param_type (str): Type of the input. Default: None.</span>
<span class="sd">            shape (str): Shape of the input. Default: None.</span>
<span class="sd">            value_depend (str): Whether the input is constant value depend. Default: None.</span>
<span class="sd">            kwargs (dict): Other information of the input.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">index</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">need_compile</span><span class="p">,</span> <span class="n">param_type</span><span class="p">,</span> <span class="n">shape</span><span class="p">,</span> <span class="n">value_depend</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;index&quot;</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;need_compile&quot;</span><span class="p">,</span> <span class="s2">&quot;param_type&quot;</span><span class="p">,</span> <span class="s2">&quot;shape&quot;</span><span class="p">,</span> <span class="s2">&quot;value_depend&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_int</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_bool</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">input_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="n">value_depend_values</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;ignored&quot;</span><span class="p">,</span> <span class="s2">&quot;optional&quot;</span><span class="p">,</span> <span class="s2">&quot;required&quot;</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">value_depend</span> <span class="ow">and</span> <span class="n">value_depend</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">value_depend_values</span><span class="p">:</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Operator </span><span class="si">{}</span><span class="s2"> input</span><span class="si">{}</span><span class="s2">&#39;s value_depend&#39;s value (</span><span class="si">{}</span><span class="s2">) is not in </span><span class="si">{}</span><span class="s2">.&quot;</span><span class="o">.</span>
                             <span class="nb">format</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">op_name</span><span class="p">,</span> <span class="n">index</span><span class="p">,</span> <span class="n">value_depend</span><span class="p">,</span> <span class="n">value_depend_values</span><span class="p">))</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">inputs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">input_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="TBERegOp.output"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.TBERegOp.html#mindspore.ops.TBERegOp.output">[docs]</a>    <span class="k">def</span> <span class="nf">output</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">need_compile</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">param_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register TBE op output information.</span>

<span class="sd">        Args:</span>
<span class="sd">            index (int): Order of the output. Default: None.</span>
<span class="sd">            name (str): Name of the output. Default: None.</span>
<span class="sd">            need_compile (bool): Whether the output needs to be compiled or not. Default: None.</span>
<span class="sd">            param_type (str): Type of the output. Default: None.</span>
<span class="sd">            shape (str): Shape of the output. Default: None.</span>
<span class="sd">            kwargs (dict): Other information of the output.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">index</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">need_compile</span><span class="p">,</span> <span class="n">param_type</span><span class="p">,</span> <span class="n">shape</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;index&quot;</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;need_compile&quot;</span><span class="p">,</span> <span class="s2">&quot;param_type&quot;</span><span class="p">,</span> <span class="s2">&quot;shape&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_int</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_bool</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">output_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">outputs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">output_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span></div></div>


<div class="viewcode-block" id="CustomRegOp"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.CustomRegOp.html#mindspore.ops.CustomRegOp">[docs]</a><span class="k">class</span> <span class="nc">CustomRegOp</span><span class="p">(</span><span class="n">RegOp</span><span class="p">):</span>
    <span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Class used for generating the registration information for the `func` parameter of :class:`mindspore.ops.Custom`.</span>

<span class="sd">    Args:</span>
<span class="sd">        op_name (str): kernel name. No need to set this value as `Custom`, operator will generate a unique name</span>
<span class="sd">            automatically. Default: &quot;Custom&quot;.</span>

<span class="sd">    Examples:</span>
<span class="sd">        &gt;&gt;&gt; from mindspore.ops import CustomRegOp, DataType</span>
<span class="sd">        &gt;&gt;&gt; custom_op_ascend_info = CustomRegOp() \</span>
<span class="sd">        ...     .input(0, &quot;x&quot;, &quot;dynamic&quot;) \</span>
<span class="sd">        ...     .output(0, &quot;y&quot;) \</span>
<span class="sd">        ...     .dtype_format(DataType.F16_Default, DataType.F16_Default) \</span>
<span class="sd">        ...     .dtype_format(DataType.F32_Default, DataType.F32_Default) \</span>
<span class="sd">        ...     .target(&quot;Ascend&quot;) \</span>
<span class="sd">        ...     .get_op_info()</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op_name</span><span class="o">=</span><span class="s2">&quot;Custom&quot;</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">(</span><span class="n">CustomRegOp</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">op_name</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">target_</span> <span class="o">=</span> <span class="s2">&quot;UnKnown&quot;</span>

<div class="viewcode-block" id="CustomRegOp.input"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.CustomRegOp.html#mindspore.ops.CustomRegOp.input">[docs]</a>    <span class="k">def</span> <span class="nf">input</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">param_type</span><span class="o">=</span><span class="s2">&quot;required&quot;</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register Custom op input information.</span>

<span class="sd">        Args:</span>
<span class="sd">            index (int): Order of the input. Default: None.</span>
<span class="sd">            name (str): Name of the input. Default: None.</span>
<span class="sd">            param_type (str): Param type of the input. Default: &quot;required&quot;.</span>
<span class="sd">            kwargs (dict): Other information of the input.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">index</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">param_type</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;index&quot;</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;param_type&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_int</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">input_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">inputs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">input_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="CustomRegOp.output"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.CustomRegOp.html#mindspore.ops.CustomRegOp.output">[docs]</a>    <span class="k">def</span> <span class="nf">output</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">param_type</span><span class="o">=</span><span class="s2">&quot;required&quot;</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register Custom op output information.</span>

<span class="sd">        Args:</span>
<span class="sd">            index (int): Order of the output. Default: None.</span>
<span class="sd">            name (str): Name of the output. Default: None.</span>
<span class="sd">            param_type (str): Param type of the output. Default: &quot;required&quot;.</span>
<span class="sd">            kwargs (dict): Other information of the output.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">index</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">param_type</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;index&quot;</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;param_type&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_int</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">output_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">outputs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">output_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="CustomRegOp.attr"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.CustomRegOp.html#mindspore.ops.CustomRegOp.attr">[docs]</a>    <span class="k">def</span> <span class="nf">attr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">param_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">value_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">default_value</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register Custom op attribute information.</span>

<span class="sd">        Args:</span>
<span class="sd">            name (str): Name of the attribute. Default: None.</span>
<span class="sd">            param_type (str): Param type of the attribute. Default: None.</span>
<span class="sd">            value_type (str): Value type of the attribute. Default: None.</span>
<span class="sd">            default_value (str): Default value of attribute. If value is a list, each item should split by &#39;,&#39;.</span>
<span class="sd">                For example, if `value_type` is &quot;listInt&quot;, then `default_value` can be &quot;1,2,3&quot;. Default: None.</span>
<span class="sd">            kwargs (dict): Other information of the attribute.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">param_list</span> <span class="o">=</span> <span class="p">[</span><span class="n">name</span><span class="p">,</span> <span class="n">param_type</span><span class="p">,</span> <span class="n">value_type</span><span class="p">,</span> <span class="n">default_value</span><span class="p">]</span>
        <span class="n">key_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;param_type&quot;</span><span class="p">,</span> <span class="s2">&quot;type&quot;</span><span class="p">,</span> <span class="s2">&quot;default_value&quot;</span><span class="p">]</span>
        <span class="n">fn_list</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">]</span>
        <span class="n">attr_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_check_param</span><span class="p">(</span><span class="n">param_list</span><span class="p">,</span> <span class="n">key_list</span><span class="p">,</span> <span class="n">fn_list</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">attr_</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">attr_dict</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span></div>

<div class="viewcode-block" id="CustomRegOp.target"><a class="viewcode-back" href="../../../api_python/ops/mindspore.ops.CustomRegOp.html#mindspore.ops.CustomRegOp.target">[docs]</a>    <span class="k">def</span> <span class="nf">target</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Register Custom op target information.</span>

<span class="sd">        Args:</span>
<span class="sd">            target (str): Device target for current operator information, should be one of [&quot;Ascend&quot;, &quot;GPU&quot;, &quot;CPU&quot;].</span>
<span class="sd">                Default: None.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_is_string</span><span class="p">(</span><span class="n">target</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">target_</span> <span class="o">=</span> <span class="n">target</span>
        <span class="k">return</span> <span class="bp">self</span></div></div>


<span class="k">class</span> <span class="nc">DataType</span><span class="p">:</span>
    <span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Various combinations of dtype and format of Ascend ops.</span>

<span class="sd">    The current list below may be incomplete.</span>

<span class="sd">    Please add it if necessary.</span>

<span class="sd">    current support:</span>

<span class="sd">    .. code-block::</span>

<span class="sd">        None_None = (&quot;&quot;, &quot;&quot;)</span>
<span class="sd">        None_Default = (&quot;&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        BOOL_None = (&quot;bool&quot;, &quot;&quot;)</span>
<span class="sd">        BOOL_Default = (&quot;bool&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        BOOL_5HD = (&quot;bool&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        BOOL_FracZ = (&quot;bool&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        BOOL_FracNZ = (&quot;bool&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        BOOL_C1HWNCoC0 = (&quot;bool&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        BOOL_NCHW = (&quot;bool&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        BOOL_NHWC = (&quot;bool&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        BOOL_HWCN = (&quot;bool&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        BOOL_NDHWC = (&quot;bool&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        BOOL_ChannelLast = (&quot;bool&quot;, &quot;ChannelLast&quot;)</span>

<span class="sd">        I8_None = (&quot;int8&quot;, &quot;&quot;)</span>
<span class="sd">        I8_Default = (&quot;int8&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        I8_5HD = (&quot;int8&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        I8_FracZ = (&quot;int8&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        I8_FracNZ = (&quot;int8&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        I8_C1HWNCoC0 = (&quot;int8&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        I8_NCHW = (&quot;int8&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        I8_NHWC = (&quot;int8&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        I8_HWCN = (&quot;int8&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        I8_NDHWC = (&quot;int8&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        I8_ChannelLast = (&quot;int8&quot;, &quot;ChannelLast&quot;)</span>
<span class="sd">        I8_NDC1HWC0 = (&quot;int8&quot;, &quot;NDC1HWC0&quot;)</span>

<span class="sd">        U8_None = (&quot;uint8&quot;, &quot;&quot;)</span>
<span class="sd">        U8_Default = (&quot;uint8&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        U8_5HD = (&quot;uint8&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        U8_FracZ = (&quot;uint8&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        U8_FracNZ = (&quot;uint8&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        U8_C1HWNCoC0 = (&quot;uint8&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        U8_NCHW = (&quot;uint8&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        U8_NHWC = (&quot;uint8&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        U8_HWCN = (&quot;uint8&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        U8_NDHWC = (&quot;uint8&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        U8_ChannelLast = (&quot;uint8&quot;, &quot;ChannelLast&quot;)</span>
<span class="sd">        U8_NDC1HWC0 = (&quot;uint8&quot;, &quot;NDC1HWC0&quot;)</span>

<span class="sd">        I16_None = (&quot;int16&quot;, &quot;&quot;)</span>
<span class="sd">        I16_Default = (&quot;int16&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        I16_5HD = (&quot;int16&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        I16_FracZ = (&quot;int16&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        I16_FracNZ = (&quot;int16&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        I16_C1HWNCoC0 = (&quot;int16&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        I16_NCHW = (&quot;int16&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        I16_NHWC = (&quot;int16&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        I16_HWCN = (&quot;int16&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        I16_NDHWC = (&quot;int16&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        I16_ChannelLast = (&quot;int16&quot;, &quot;ChannelLast&quot;)</span>

<span class="sd">        U16_None = (&quot;uint16&quot;, &quot;&quot;)</span>
<span class="sd">        U16_Default = (&quot;uint16&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        U16_5HD = (&quot;uint16&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        U16_FracZ = (&quot;uint16&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        U16_FracNZ = (&quot;uint16&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        U16_C1HWNCoC0 = (&quot;uint16&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        U16_NCHW = (&quot;uint16&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        U16_NHWC = (&quot;uint16&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        U16_HWCN = (&quot;uint16&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        U16_NDHWC = (&quot;uint16&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        U16_ChannelLast = (&quot;uint16&quot;, &quot;ChannelLast&quot;)</span>

<span class="sd">        I32_None = (&quot;int32&quot;, &quot;&quot;)</span>
<span class="sd">        I32_Default = (&quot;int32&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        I32_5HD = (&quot;int32&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        I32_FracZ = (&quot;int32&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        I32_FracNZ = (&quot;int32&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        I32_C1HWNCoC0 = (&quot;int32&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        I32_NCHW = (&quot;int32&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        I32_NHWC = (&quot;int32&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        I32_HWCN = (&quot;int32&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        I32_NDHWC = (&quot;int32&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        I32_ChannelLast = (&quot;int32&quot;, &quot;ChannelLast&quot;)</span>

<span class="sd">        U32_None = (&quot;uint32&quot;, &quot;&quot;)</span>
<span class="sd">        U32_Default = (&quot;uint32&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        U32_5HD = (&quot;uint32&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        U32_FracZ = (&quot;uint32&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        U32_FracNZ = (&quot;uint32&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        U32_C1HWNCoC0 = (&quot;uint32&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        U32_NCHW = (&quot;uint32&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        U32_NHWC = (&quot;uint32&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        U32_HWCN = (&quot;uint32&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        U32_NDHWC = (&quot;uint32&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        U32_ChannelLast = (&quot;uint32&quot;, &quot;ChannelLast&quot;)</span>

<span class="sd">        I64_None = (&quot;int64&quot;, &quot;&quot;)</span>
<span class="sd">        I64_Default = (&quot;int64&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        I64_5HD = (&quot;int64&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        I64_FracZ = (&quot;int64&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        I64_FracNZ = (&quot;int64&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        I64_C1HWNCoC0 = (&quot;int64&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        I64_NCHW = (&quot;int64&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        I64_NHWC = (&quot;int64&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        I64_HWCN = (&quot;int64&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        I64_NDHWC = (&quot;int64&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        I64_ChannelLast = (&quot;int64&quot;, &quot;ChannelLast&quot;)</span>

<span class="sd">        U64_None = (&quot;uint64&quot;, &quot;&quot;)</span>
<span class="sd">        U64_Default = (&quot;uint64&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        U64_5HD = (&quot;uint64&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        U64_FracZ = (&quot;uint64&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        U64_FracNZ = (&quot;uint64&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        U64_C1HWNCoC0 = (&quot;uint64&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        U64_NCHW = (&quot;uint64&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        U64_NHWC = (&quot;uint64&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        U64_HWCN = (&quot;uint64&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        U64_NDHWC = (&quot;uint64&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        U64_ChannelLast = (&quot;uint64&quot;, &quot;ChannelLast&quot;)</span>

<span class="sd">        F16_None = (&quot;float16&quot;, &quot;&quot;)</span>
<span class="sd">        F16_Default = (&quot;float16&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        F16_5HD = (&quot;float16&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        F16_FracZ = (&quot;float16&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        F16_FracNZ = (&quot;float16&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        F16_C1HWNCoC0 = (&quot;float16&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        F16_NCHW = (&quot;float16&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        F16_NHWC = (&quot;float16&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        F16_HWCN = (&quot;float16&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        F16_NDHWC = (&quot;float16&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        F16_NCDHW = (&quot;float16&quot;, &quot;NCDHW&quot;)</span>
<span class="sd">        F16_DHWCN = (&quot;float16&quot;, &quot;DHWCN&quot;)</span>
<span class="sd">        F16_NDC1HWC0 = (&quot;float16&quot;, &quot;NDC1HWC0&quot;)</span>
<span class="sd">        F16_FRACTAL_Z_3D = (&quot;float16&quot;, &quot;FRACTAL_Z_3D&quot;)</span>
<span class="sd">        F16_FracZNLSTM = (&quot;float16&quot;, &quot;FRACTAL_ZN_LSTM&quot;)</span>
<span class="sd">        F16_FracZNRNN = (&quot;float16&quot;, &quot;FRACTAL_ZN_RNN&quot;)</span>
<span class="sd">        F16_ND_RNNBIAS = (&quot;float16&quot;, &quot;ND_RNN_BIAS&quot;)</span>
<span class="sd">        F16_ChannelLast = (&quot;float16&quot;, &quot;ChannelLast&quot;)</span>

<span class="sd">        F32_None = (&quot;float32&quot;, &quot;&quot;)</span>
<span class="sd">        F32_Default = (&quot;float32&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        F32_5HD = (&quot;float32&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        F32_FracZ = (&quot;float32&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        F32_FracNZ = (&quot;float32&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        F32_C1HWNCoC0 = (&quot;float32&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        F32_NCHW = (&quot;float32&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        F32_NHWC = (&quot;float32&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        F32_HWCN = (&quot;float32&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        F32_NDHWC = (&quot;float32&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        F32_NCDHW = (&quot;float32&quot;, &quot;NCDHW&quot;)</span>
<span class="sd">        F32_DHWCN = (&quot;float32&quot;, &quot;DHWCN&quot;)</span>
<span class="sd">        F32_NDC1HWC0 = (&quot;float32&quot;, &quot;NDC1HWC0&quot;)</span>
<span class="sd">        F32_FRACTAL_Z_3D = (&quot;float32&quot;, &quot;FRACTAL_Z_3D&quot;)</span>
<span class="sd">        F32_FracZNLSTM = (&quot;float32&quot;, &quot;FRACTAL_ZN_LSTM&quot;)</span>
<span class="sd">        F32_FracZNRNN = (&quot;float32&quot;, &quot;FRACTAL_ZN_RNN&quot;)</span>
<span class="sd">        F32_ND_RNNBIAS = (&quot;float32&quot;, &quot;ND_RNN_BIAS&quot;)</span>
<span class="sd">        F32_ChannelLast = (&quot;float32&quot;, &quot;ChannelLast&quot;)</span>

<span class="sd">        F64_None = (&quot;float64&quot;, &quot;&quot;)</span>
<span class="sd">        F64_Default = (&quot;float64&quot;, &quot;DefaultFormat&quot;)</span>
<span class="sd">        F64_5HD = (&quot;float64&quot;, &quot;NC1HWC0&quot;)</span>
<span class="sd">        F64_FracZ = (&quot;float64&quot;, &quot;FracZ&quot;)</span>
<span class="sd">        F64_FracNZ = (&quot;float64&quot;, &quot;FRACTAL_NZ&quot;)</span>
<span class="sd">        F64_C1HWNCoC0 = (&quot;float64&quot;, &quot;C1HWNCoC0&quot;)</span>
<span class="sd">        F64_NCHW = (&quot;float64&quot;, &quot;NCHW&quot;)</span>
<span class="sd">        F64_NHWC = (&quot;float64&quot;, &quot;NHWC&quot;)</span>
<span class="sd">        F64_HWCN = (&quot;float64&quot;, &quot;HWCN&quot;)</span>
<span class="sd">        F64_NDHWC = (&quot;float64&quot;, &quot;NDHWC&quot;)</span>
<span class="sd">        F64_ChannelLast = (&quot;float64&quot;, &quot;ChannelLast&quot;)</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="n">None_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">None_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">BOOL_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;bool&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">BOOL_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;bool&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">BOOL_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;bool&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">BOOL_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;bool&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">BOOL_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;bool&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">BOOL_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;bool&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">BOOL_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;bool&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">BOOL_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;bool&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">BOOL_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;bool&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">BOOL_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;bool&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">BOOL_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;bool&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>

    <span class="n">I8_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">I8_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">I8_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">I8_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">I8_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">I8_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">I8_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">I8_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">I8_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">I8_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">I8_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>
    <span class="n">I8_NDC1HWC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int8&quot;</span><span class="p">,</span> <span class="s2">&quot;NDC1HWC0&quot;</span><span class="p">)</span>

    <span class="n">U8_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">U8_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">U8_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">U8_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">U8_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">U8_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">U8_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">U8_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">U8_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">U8_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">U8_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>
    <span class="n">U8_NDC1HWC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint8&quot;</span><span class="p">,</span> <span class="s2">&quot;NDC1HWC0&quot;</span><span class="p">)</span>

    <span class="n">I16_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int16&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">I16_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int16&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">I16_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int16&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">I16_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int16&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">I16_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int16&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">I16_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int16&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">I16_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int16&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">I16_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int16&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">I16_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int16&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">I16_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int16&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">I16_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int16&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>

    <span class="n">U16_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint16&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">U16_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint16&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">U16_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint16&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">U16_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint16&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">U16_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint16&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">U16_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint16&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">U16_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint16&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">U16_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint16&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">U16_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint16&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">U16_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint16&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">U16_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint16&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>

    <span class="n">I32_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int32&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">I32_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int32&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">I32_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int32&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">I32_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int32&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">I32_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int32&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">I32_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int32&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">I32_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int32&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">I32_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int32&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">I32_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int32&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">I32_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int32&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">I32_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int32&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>

    <span class="n">U32_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint32&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">U32_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint32&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">U32_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint32&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">U32_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint32&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">U32_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint32&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">U32_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint32&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">U32_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint32&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">U32_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint32&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">U32_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint32&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">U32_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint32&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">U32_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint32&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>

    <span class="n">I64_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int64&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">I64_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int64&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">I64_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int64&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">I64_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int64&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">I64_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int64&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">I64_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int64&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">I64_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int64&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">I64_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int64&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">I64_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int64&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">I64_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int64&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">I64_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;int64&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>

    <span class="n">U64_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint64&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">U64_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint64&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">U64_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint64&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">U64_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint64&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">U64_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint64&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">U64_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint64&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">U64_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint64&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">U64_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint64&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">U64_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint64&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">U64_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint64&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">U64_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;uint64&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>

    <span class="n">F16_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">F16_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">F16_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">F16_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">F16_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">F16_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">F16_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">F16_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">F16_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">F16_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">F16_NCDHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;NCDHW&quot;</span><span class="p">)</span>
    <span class="n">F16_DHWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;DHWCN&quot;</span><span class="p">)</span>
    <span class="n">F16_NDC1HWC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;NDC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">F16_FRACTAL_Z_3D</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_Z_3D&quot;</span><span class="p">)</span>
    <span class="n">F16_FracZNLSTM</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_ZN_LSTM&quot;</span><span class="p">)</span>
    <span class="n">F16_FracZNRNN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_ZN_RNN&quot;</span><span class="p">)</span>
    <span class="n">F16_ND_RNNBIAS</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;ND_RNN_BIAS&quot;</span><span class="p">)</span>
    <span class="n">F16_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float16&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>

    <span class="n">F32_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">F32_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">F32_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">F32_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">F32_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">F32_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">F32_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">F32_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">F32_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">F32_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">F32_NCDHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;NCDHW&quot;</span><span class="p">)</span>
    <span class="n">F32_DHWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;DHWCN&quot;</span><span class="p">)</span>
    <span class="n">F32_NDC1HWC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;NDC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">F32_FRACTAL_Z_3D</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_Z_3D&quot;</span><span class="p">)</span>
    <span class="n">F32_FracZNLSTM</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_ZN_LSTM&quot;</span><span class="p">)</span>
    <span class="n">F32_FracZNRNN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_ZN_RNN&quot;</span><span class="p">)</span>
    <span class="n">F32_ND_RNNBIAS</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;ND_RNN_BIAS&quot;</span><span class="p">)</span>
    <span class="n">F32_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float32&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>

    <span class="n">F64_None</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float64&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span>
    <span class="n">F64_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float64&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">F64_5HD</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float64&quot;</span><span class="p">,</span> <span class="s2">&quot;NC1HWC0&quot;</span><span class="p">)</span>
    <span class="n">F64_FracZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float64&quot;</span><span class="p">,</span> <span class="s2">&quot;FracZ&quot;</span><span class="p">)</span>
    <span class="n">F64_FracNZ</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float64&quot;</span><span class="p">,</span> <span class="s2">&quot;FRACTAL_NZ&quot;</span><span class="p">)</span>
    <span class="n">F64_C1HWNCoC0</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float64&quot;</span><span class="p">,</span> <span class="s2">&quot;C1HWNCoC0&quot;</span><span class="p">)</span>
    <span class="n">F64_NCHW</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float64&quot;</span><span class="p">,</span> <span class="s2">&quot;NCHW&quot;</span><span class="p">)</span>
    <span class="n">F64_NHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float64&quot;</span><span class="p">,</span> <span class="s2">&quot;NHWC&quot;</span><span class="p">)</span>
    <span class="n">F64_HWCN</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float64&quot;</span><span class="p">,</span> <span class="s2">&quot;HWCN&quot;</span><span class="p">)</span>
    <span class="n">F64_NDHWC</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float64&quot;</span><span class="p">,</span> <span class="s2">&quot;NDHWC&quot;</span><span class="p">)</span>
    <span class="n">F64_ChannelLast</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;float64&quot;</span><span class="p">,</span> <span class="s2">&quot;ChannelLast&quot;</span><span class="p">)</span>

    <span class="n">C64_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;complex64&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
    <span class="n">C128_Default</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;complex128&quot;</span><span class="p">,</span> <span class="s2">&quot;DefaultFormat&quot;</span><span class="p">)</span>
</pre></div>

           </div>
           
          </div>
          <footer>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2021, MindSpore.

    </p>
  </div>
    
    
    
    Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    
    provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>